/*
* @Author: wanghongfucoder
* @Date:   2017-03-21 11:06:09
* @Last Modified by:   wanghongfucoder
* @Last Modified time: 2017-03-21 11:08:35
*/

public class HexaObserver extends Observer{
	
	public HexaObserver(Subject subject){
		this.subject=subject;
		this.subject.attach(this);
	}

	public void update(){
		System.out.println("Hexa String : "+Integer.toHexString(subject.getState()).toUpperCase());
	}
}